// store.js
import { observable, action } from 'mobx-miniprogram'

export const store = observable({
  // datas
  username: '',
  userAvatar: '',
  email: '',
  token: '',

  // actions
  setUsername: action(function (value) {
    this.username = value
  }),
  setUserAvatar: action(function (value) {
    this.userAvatar = value
  }),
  setEmail: action(function (value) {
    this.email = value
  }),
  setToken: action(function (value) {
    this.token = value
  }),
});